import java.util.Arrays;

public class Solution {
    public static void main(String[] args) {
        int[] array = {1,2,3,4,5,6};
        int target = 9;
        System.out.println(Arrays.toString(twoSum(array,target)));
    }

    public static int[] twoSum(int[] array,int target){
        for (int i = 0; i < array.length-1; i++){
            for (int j = i + 1; j < array.length; j++){
                if (array[i] + array[j] == target){
                    return new int[] {array[i],array[j]};
                }
            }
        }
        return null;
    }
}





